﻿@using Library
@model Ecommerce.Models.ContactViewModel

@using (Ajax.BeginForm("Contact", "Shared", new AjaxOptions
    {
        HttpMethod = "POST",
        AllowCache = false,
        UpdateTargetId = "contactformctnr",
        InsertionMode = InsertionMode.Replace
    }))
{
    <h4>@NOWCulture.GetString("Your contact"):</h4>
    if (!string.IsNullOrWhiteSpace(ViewBag.Thankyou))
    {
        <p class="bg-info">@ViewBag.Thankyou</p>
    }
    @Html.HiddenFor(m => m.ReturnUrl, Request.RawUrl)
    <div class="form-group">
        <label>@NOWCulture.GetString("Full name")</label>
        @Html.TextBoxFor(m => m.SenderName, new { @class = "form-control" })
        @Html.ValidationMessageFor(m => m.SenderName, "", new { @class = "text-danger" })
    </div>
    <div class="form-group">
        <label>@NOWCulture.GetString("Email")</label>
        @Html.TextBoxFor(m => m.SenderEmail, new { @class = "form-control" })
        @Html.ValidationMessageFor(m => m.SenderEmail, "", new { @class = "text-danger" })
    </div>
    <div class="form-group">
        <label>@NOWCulture.GetString("Content")</label>
        @Html.TextAreaFor(m => m.Content, new { @class = "form-control", @rows = 4 })
        @Html.ValidationMessageFor(m => m.Content, "", new { @class = "text-danger" })
    </div>
    @Html.ValidationSummary(true, "", new { @class = "bg-danger" })
    <div class="form-group ">
        <input class="btn btn-default" type="reset" value="Nhập lại"/>
        <input class="btn btn-primary" type="submit" value="Gửi" />
    </div>
}